import FSM from "./FSM";
import { FSMState } from "./FSMState";

export default class SubFSMState extends FSMState {
    private _subFsm: FSM = null;
    get subFsm(): FSM {
        return this._subFsm;
    }
    set subFsm(value: FSM) {
        this._subFsm = value;
    }

    public update(dt: any): void {
        this.subFsm.update(dt);
    }

    public onEixt(): void {
        this.subFsm.exit();
        super.onEixt();
    }
}
